<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="dep.js"></script>
    <script src="watcher.js"></script>
    <script src="observer.js"></script>
    <script src="compiler.js"></script>
    <script src="vue.js"></script>
</head>
<body>
    <div id="app">
        <div>{{msg}}</div>
        <div v-text="msg"></div>
        <div><input type="text" name="" id="" v-model="msg" /></div>
        <div v-html="htmlStr"></div>
        <div v-on:click="onClick">v-on test</div>
        <div v-on:keyup="onChange" contenteditable>contenteditable test</div>
    </div>
    <script>
        new Vue({
            el: '#app',
            data: {
                msg: 'message',
                htmlStr: '<p style="color: #ff0;">html innerHTML</p>'
            },
            methods: {
                onClick(e) {
                    console.log('click: ', e.target.innerText);
                },
                onChange(e) {
                    console.log('contenteditable: ', e.target.innerText);
                }
            }
        })
    </script>
</body>
</html>